//
//  CalculatorManager.m
//  iOSCodeLearning
//
//  Created by TFAppleWork-Summer on 2018/4/11.
//  Copyright © 2018年 Ace. All rights reserved.
//

#import "CalculatorManager.h"

@implementation CalculatorManager

//-(CalculatorManager *)add:(int)value{
//    _result += value;
//    return self;
//}
//

-(CalculatorManager *(^)(int))add{
    
    return ^(int value){
        _result +=value;
        return self;
    };
    
}

-(void)add:(void (^)(int))block{
    if (block) {
        block(_result);
    }
}


@end
